/**
*	展会首页
**/
app.controller('gExpoIndexCtrl', ['$scope', '$state', '$stateParams', '$http', 'gConfig', 'utils',
  function($scope, $state, $stateParams, $http, gConfig, utils) {
    // 页面数据
    $scope.expoData = {
      loading: true,
      listData: []
    }

    // 暴露到控制器
    $scope.utils = utils;
    $scope.stateParams = $stateParams;

    // 区域
    var _exhibitionSite = $stateParams.type === 'inland' ? 8 : '1,2,3,4,5,6,7';

    // 获取预警快报列表信息
    utils.get('queryExpoList', {
        random: Math.random(),
        page: 1,
        size: 15,
        mainType: '',
        name: '',
        year: '',
        exhibitionSite: _exhibitionSite
    }).success(function (rs) {
      $scope.expoData.listData = rs.data.list;
      $scope.expoData.loading = false;
    });
  }
]);
